<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonList.jsp" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>装修申请</title>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript" src="${ctx }/scripts/common/prototype.js"></script>

<script>
	function init(){
		var beginDate =  $('beginDate').value;
		var endDate=$('endDate').value;

		endList = endDate.split("-")
		endDate = new Date(endList[1] + '-' + endList[2] + '-' + endList[0]) //转换为12-18-2002格式

		beginList = beginDate.split("-")
		beginDate = new Date(beginList[1] + '-' + beginList[2] + '-' + beginList[0])

		if (beginDate > endDate){
			$('renovateDays').innerText = "";
			return ;
		}

		var iDays = parseInt(Math.abs(endDate - beginDate) / 1000 / 60 / 60 /24) //把相差的毫秒数转换为天数

		if (isNaN(iDays)){
			$('renovateDays').innerText ="";
		}else{
			$('renovateDays').innerText = iDays+1;
		}
	}

</script>
</head>

<body onload="init();">
<div id="tab_Search" style="overflow:auto; height:350px;">
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">
          <tr><td colspan="4" class="aux_titletable">业主资料</td></tr>
          <tr>
            <td class="aux_intable_td1">房 号：</td>
            <td class="aux_intable_td2">${requisitionVO.houseNumber }</td>
            <td class="aux_intable_td1">装修联系人：</td>
            <td class="aux_intable_td2">${requisitionVO.linkman }</td>
          </tr>
          <tr>
            <td class="aux_intable_td1">业主姓名：</td>
            <td class="aux_intable_td2">${requisitionVO.clientNames }</td>
            <td class="aux_intable_td1">装修联系人电话：</td>
            <td class="aux_intable_td2">${requisitionVO.linkManPhone }</td>
          </tr>
          <tr>
            <td class="aux_intable_td1">装修面积：</td>
            <td colspan="3" class="aux_intable_td2">${requisitionVO.area }&nbsp;㎡</td>
          </tr>
          <tr>
            <td colspan="4" class="aux_titletable">
            	<c:if test="${requisitionVO.renovateType == '001'}">自装</c:if>
             	<c:if test="${requisitionVO.renovateType == '002'}">装修公司承接装修</c:if>
            </td>
          </tr>
          <tr>
            <td valign="top" class="aux_intable_td1">装修承建商：</td>
            <td class="aux_intable_td2">${requisitionVO.companyName }</td>
            <td class="aux_intable_td1">防火负责人：</td>
            <td class="aux_intable_td2">${requisitionVO.fireproofingMan }</td>
          </tr>
          <tr>
            <td valign="top" class="aux_intable_td1">资质等级：</td>
            <td class="aux_intable_td2">${requisitionVO.levelView }</td>
            <td class="aux_intable_td1">装修申请日期：</td>
            <td valign="top" class="aux_intable_td2">${requisitionVO.requisitionDate }</td>
          </tr>
          <tr>
            <td class="aux_intable_td1">现场负责人姓名：</td>
            <td class="aux_intable_td2">${requisitionVO.burdenMan }</td>
            <td valign="top" class="aux_intable_td1">装修施工期限：</td>
            <td class="aux_intable_td2">
            <input type="hidden" id="beginDate" value="<fmt:formatDate pattern='yyyy-MM-dd' value='${requisitionVO.beginDate}'/>">
            <input type="hidden" id="endDate" value="<fmt:formatDate pattern='yyyy-MM-dd' value='${requisitionVO.endDate}'/>">
            	从&nbsp;
            	<fmt:formatDate pattern='yyyy-MM-dd' value='${requisitionVO.beginDate}'/>&nbsp;到&nbsp;
            	<fmt:formatDate pattern='yyyy-MM-dd' value='${requisitionVO.endDate}'/>&nbsp;共&nbsp;
            	<span id="renovateDays"></span> &nbsp;天</td>
          </tr>
          <tr>
            <td class="aux_intable_td1">现场负责人电话：</td>
            <td class="aux_intable_td2">${requisitionVO.burdenManPhone }</td>
            <td class="aux_intable_td1">记录人：</td>
            <td valign="top" class="aux_intable_td2">${requisitionVO.creatorName }</td>
          </tr>
          <tr>
            <td class="aux_intable_td1">身份证号码：</td>
            <td class="aux_intable_td2">${requisitionVO.identityCard }</td>
            <td class="aux_intable_td1">记录时间：</td>
            <td valign="top" class="aux_intable_td2"><fmt:formatDate pattern='yyyy-MM-dd' value='${requisitionVO.createDate }'/></td>
          </tr>
          <tr>
            <td class="aux_intable_td1">装修项目：</td>
            <td class="aux_intable_td2">${requisitionVO.items }</td>
            <td valign="top" class="aux_intable_td1">备 注：</td>
            <td valign="top" class="aux_intable_td2">${requisitionVO.remark}</td>
          </tr>
        </table>
        </div>
</body>
</html>